l2tpv3tun add tunnel tunnel_id 5000 peer_tunnel_id 5000 encap ip local 192.168.100.9 remote 192.168.100.69
l2tpv3tun add session tunnel_id 5000 session_id 5000 peer_session_id 5000
ip addr add 10.0.0.10 peer 10.0.0.1 dev l2tpeth0
ifconfig l2tpeth0 up
ip link set l2tpeth0 up mtu 1488

iptables -I INPUT 1 -i l2tpeth0 -j ACCEPT
iptables -A FORWARD -i l2tpeth0 -j ACCEPT
iptables -A FORWARD -i l2tpeth0 -m state --state RELATED,ESTABLISHED -j ACCEPT
iptables -t nat -D POSTROUTING -o l2tpeth0 -j MASQUERADE
iptables -t nat -A POSTROUTING -o l2tpeth0 -j MASQUERADE
route add default gw 10.0.0.10 dev l2tpeth0

l2tpv3tun del tunnel tunnel_id 5000 peer_tunnel_id 5000



l2tpv3tun add tunnel tunnel_id 5000 peer_tunnel_id 5000 encap ip local 192.168.100.69 remote 192.168.100.9
l2tpv3tun add session tunnel_id 5000 session_id 5000 peer_session_id 5000
ip addr add 10.0.0.1 peer 10.0.0.10 dev l2tpeth0
ifconfig l2tpeth0 up
ip link set l2tpeth0 up mtu 1488

iptables -I INPUT 1 -i l2tpeth0 -j ACCEPT
iptables -A FORWARD -i l2tpeth0 -j ACCEPT
iptables -A FORWARD -i l2tpeth0 -m state --state RELATED,ESTABLISHED -j ACCEPT
iptables -t nat -D POSTROUTING -o l2tpeth0 -j MASQUERADE
iptables -t nat -A POSTROUTING -o l2tpeth0 -j MASQUERADE
route add default gw 10.0.0.1 dev l2tpeth0




l2tpv3tun add tunnel tunnel_id ${tunnel_localid} peer_tunnel_id ${tunnel_peerid} encap ip local ${local_ip} remote ${peer_ip}
l2tpv3tun add session tunnel_id ${tunnel_localid} session_id ${session_localid} peer_session_id ${session_peerid}
ip addr add ${tunnel_localip} peer ${tunnel_peerip} dev l2tpeth0
ifconfig l2tpeth0 up
ip link set l2tpeth0 up mtu ${mtu}

route add default gw ${tunnel_localip} dev l2tpeth0
